import React from 'react';
import { Switch, Route } from "react-router-dom";
import ListPage from './TaskList';
import ProcessListPage from './TaskProcess';
import ViewPage from './TaskView';
import EditPage from './TaskEdit';

export const Region = {
  text: '任务',
};

const TaskComp = ({match}) => (
  <Switch>
    <Route path={`${match.url}/list`} component={ListPage} />
    <Route path={`${match.url}/processList/:id`} component={ProcessListPage} />
    <Route path={`${match.url}/view/:id`} component={ViewPage} />
    <Route path={`${match.url}/edit/:id`} component={EditPage} />
    <Route path={`${match.url}/add`} component={EditPage} />
  </Switch>
);

export default TaskComp;